package cardGame;

import static org.junit.Assert.*;
import junit.framework.TestCase;

import org.junit.Test;

public class WarGameTest extends TestCase {

	@Test
	public void test() {
		
//		for 13 players
		WarGame g = new WarGame();
		g.play(13);
		for (Player p : g.getPlayers()) {
			System.out.println(p.getHand().size());
		assertEquals(4, p.getHand().size());
		}
		
//		for 15 players
		WarGame g2 = new WarGame();
		g2.play(15);
		for (Player p : g2.getPlayers()) {
			System.out.println(p.getHand().size());
		assertEquals(3, p.getHand().size());
		}

		
//		for 2 players
		WarGame g3 = new WarGame();
		g3.play(2);
		for (Player p : g3.getPlayers()) {
			System.out.println(p.getHand().size());
		assertEquals(26, p.getHand().size());
		}
		
		
//		for 5 players
		WarGame g4 = new WarGame();
		g4.play(5);
		for (Player p : g4.getPlayers()) {
			System.out.println(p.getHand().size());
		assertEquals(10, p.getHand().size());
		}
		
		
		
		
	}

}
